Field of the Invention
The present invention relates to a color processing apparatus and a color processing method, each of which converts an input signal value expressed in the first color system into an output signal value expressed in the second color system.
Description of the Related Art
A color management system (CMS) is used for color matching between a color image shooting device, color image display device, and color image printing device. A general CMS is implemented using device profiles in which the characteristics of devices for inputting/outputting color images are described.
In the device profile, a conversion formula, a conversion table, or the like for conversion between a device-dependent color space (for example, RGB or CMYK) and a device-independent color space (for example, CIELAB or CIELUV) is described. The device-independent space is called a PCS (Profile Connection Space), and uniquely defined under a given light source. Therefore, performing color adjustment on the PCS makes it possible to absorb the difference between the reproducible color gamuts of devices.
More specifically, a device RGB value depending on a color monitor is converted into an L*a*b* value in a device-independent color space using the device profile of the color monitor. The L*a*b* value after color adjustment is then converted into a CMYK value depending on a printer using the device profile of the printer. This processing implements color adjustment.
The mutual relationship between an RGB device such as a digital camera, scanner, or monitor corresponding to a device color space defined using RGB values and a CMYK device such as a printer corresponding to a device color space defined using CMYK values is strongly nonlinear. Consequently, a conversion table is often used as a device profile for color adjustment between an RGB device and a CMYK device.
Since a general color monitor can express 256 tones for each of the colors R, G, and B, that is, 16.7 million colors or more, it is impractical to describe L*a*b* values corresponding to the RGB values of all the expressible colors in a conversion table. To cope with this, some correspondences between representative values are described in a conversion table, and the correspondence between values other than the representative values is obtained by an interpolation operation from the correspondences between the representative values.
As an interpolation operation, linear interpolation such as cubic interpolation, triangular prism interpolation, or tetrahedron interpolation is used. In cubic interpolation, an interpolation operation is performed using the correspondences (grid point data) among the eight grid points (eight representative values) of a cubic grid surrounding a value to be interpolated. Triangular prism interpolation is a method of performing an interpolation operation using the grid point data of the six vertices (six representative values) of a triangular prism obtained by dividing the above cube into two parts. Tetrahedron interpolation is a method of performing an interpolation operation using the grid point data of the four vertices (four representative values) of a tetrahedron obtained by dividing the above cube into six parts.
Tetrahedron interpolation is widely used since the number of vertices (the number of grid point data) used for an interpolation operation is small, and the operation is easy. Tetrahedron interpolation of a point P is given by:P=P1+DL(P8−P1)+Da(P3−P1)+Db(P4−P1)  (1)
where P1, P3, P4, and P8 represent the vertices of a tetrahedron, and
DL, Da, and Db represent normalized distances in respective axis directions which indicate the position of the point P with reference to the vertex P1.
For example, an input value is an L*a*b* value of 8 bits per color, and a three-dimensional lookup table (3DLUT) having 173 grid points of 163 unit cubes obtained by dividing each axis of the L*a*b* space into 16 parts is used.
In triangular prism interpolation or tetrahedron interpolation, the same segmentation method (division direction) is used across the entire region of the L*a*b* space to divide each unit cube into two triangular prisms or six tetrahedrons. Then, a unit cube to which an input value belongs is determined, and a triangular prism or tetrahedron to which the input value belongs is also determined. The grid point data of the triangular prism or tetrahedron determined as that to which the input value belongs are used to calculate an output value corresponding to the input value by an interpolation operation.
As described above, in triangular prism interpolation or tetrahedron interpolation, the same method is used to divide each unit cube across the entire region of the color space of an input image. Japanese Patent Laid-Open No. 2007-158948 (literature 1) proposes an interpolation method of defining polyhedrons so that a polyhedron, which divides a unit cube having a gray axis as an edge, has no surface which has the gray axis as an edge and cuts the unit cube, in order to improve color continuity near the gray axis.
If, however, the same segmentation method (division direction) is used to divide each unit cube into triangular prisms or tetrahedrons across the entire region, and a 3DLUT having the L*a*b* space as an input color space is used, an unintended interpolation result is obtained depending on a quadrant, and the tone representing output values is distorted. Improvement in color continuity by the interpolation method proposed by literature 1 is effective for only a cube which is in contact with the gray axis. In the interpolation method proposed in literature 1 as well, an unintended interpolation result is obtained in a region corresponding to a cube which is not in contact with the gray axis, thereby causing tone distortion, which will be described in detail later.